<div id="maincontent">
	<div id="content">
    
    <h2><?php echo lico_lang('distributions', 'page.title'); ?></h2>
    
    <div class="box1">
      <?php
      include_once("libs/xml.class.php");
      $xml = file_get_contents("xml/machines_distributions.xml");
      $domObj = new xmlToArrayParser($xml);
      $domArr = $domObj->array;
      $generated = $domArr['statistics']['_']['generated'];
      $gesamt = 0;
      for ($a=0; $a<count($domArr['statistics']['line']); $a++) {
        $gesamt += intval($domArr['statistics']['line'][$a]['num']);
      }
      ?>
      <h1><?php echo lico_lang('distributions', 'box1.page.title'); ?></h1>
        <div class="description"><?php echo str_replace("#num#", $gesamt, lico_lang('distributions', 'box1.page.description')); ?><br/><small>(Generated: <?php echo $generated; ?>)</small></div>
        <div class="infotable-line <?php echo $class; ?>">
          <ul class="infotable-ul">
            <li class="infotable-li col30p"><span><strong>Distribution name</strong></span></li>
            <li class="infotable-li col14p"><span><strong>Machines</strong></span></li>
            <li class="infotable-li col56p"><span><strong>Percent</strong></span></li>
          </ul>
        </div>
      <?php
      for ($a=0; $a<count($domArr['statistics']['line']); $a++) {
        if ($class == "odd") $class = "even"; else $class = "odd";
        $line = $domArr['statistics']['line'][$a];
        $percent = round((100/$gesamt) * intval($line['num']), 2);
        ?>
        <div class="infotable-line <?php echo $class; ?>">
          <ul class="infotable-ul">
            <li class="infotable-li col30p"><a href="<?php echo $lico['baseurl.ssl']; ?>/distribution/<?php echo urlencode(str_replace("/", "_S_", trim($line['distribution']))); ?>.html"><span><?php echo trim($line['distribution']); ?></span></a></li>
            <li class="infotable-li col14p"><span><?php echo number_format($line['num']); ?></span></li>
            <li class="infotable-li col56p"><?php echo lico_PercentBar($percent); ?></li>
          </ul>
        </div>
        <?php
      }
      ?>
      
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
  </div>
</div>
